package com.tyqx.hashchainbackend.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
public class SendController {

    /*@Resource
    private SysResourceService sysResourceService;*/

    @RequestMapping("/send_{sendUrl}")
    public String sendUrl(@PathVariable("sendUrl")String sendUrl, HttpSession session){
        /*if(sendUrl.indexOf("index")!=-1&&session.getAttribute("dcepResourcesList")==null){
            SysUser sysUser=(SysUser) session.getAttribute("sysUser");
            Map<String,Object> param=new HashMap<>();
            param.put("userId",sysUser.getUserId());
            param.put("resId","0");

            List<SysResource> dcepResourceList=sysResourceService.queryTree(param);

            session.setAttribute("dcepResourceList",dcepResourceList);
        }*/

        return sendUrl.replace("_","/");
    }
}
